<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    
    <ui:composition template="templatePadrao.xhtml"> 
                
            <ui:define name="top">       
                <ui:include src="menu.xhtml" />
            </ui:define>        
        
   <ui:define name="content">   

       <h:form id="formMessages">
           <p:growl id="messages" widgetVar="messages" showDetail="true" life="5000" sticky="false" autoUpdate="true" />  
       </h:form>
       
       <h:form id="principal" prependId="false">
               
               <p:fieldset legend="Usuário">
                   
                   <p:accordionPanel>
                        <p:tab title="Dados Cadastrais">
                       
                                <p:panelGrid id="padrao" columns="4" style="width: 100%;" styleClass="usuarioGrid">
                                             <p:outputLabel>Nome *</p:outputLabel>
                                             <p:inputText id="nome_usuario"  size="40" maxlength="60" value="#{ConfigController.usuario.nome}" title="Informe o Nome" />

                                             <p:outputLabel>E-mail *</p:outputLabel>
                                             <p:inputText id="email_usuario" size="40" maxlength="60" value="#{ConfigController.usuario.email}" title="Informe o E-mail" />                                

                                             <p:outputLabel>Login *</p:outputLabel>
                                             <p:inputText id="login_usuario" size="30" maxlength="30" value="#{ConfigController.usuario.login}" title="Informe o Login" />

                                             <p:outputLabel>Senha *</p:outputLabel>
                                             <p:password id="senha_usuario" size="30" maxlength="30" value="#{ConfigController.usuario.senha}" title="Informe a Senha" />
                                             
                                             <h:inputHidden value="#{ConfigController.senhaCriptografada}"/>
                                             
                                </p:panelGrid>
                                
                            
                        </p:tab>                                             
                       
                   </p:accordionPanel>
                              
                   <p:commandButton value="Salvar" update="principal" actionListener="#{ConfigController.preparaEdicao()}"/>
               <p:commandButton value="Cancelar" update="principal" actionListener="#{ConfigController.resetUsuario()}"/>
               
               </p:fieldset>                                              
           
       </h:form>       
       
   </ui:define>
        
   </ui:composition>
        
</html>        